Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BlockHound is a tool for JVM to detect blocking calls in non-blocking threads.
It provides an SPI to integrate with, although it also comes with built-in RxJava2 integration. Since the introduction of SPI, we encourage JVM frameworks to provide an implementation of the SPI.
Netty project just added such integration, and even Project Reactor itself uses the SPI to integrate with BlockHound.
The main motivation is to be able to adjust the integration if the internals are changed, e.g. if RxJava decides to use some other marker interface for its threads.
BlockHound is Java 8+, but the SPI class is only loaded when BlockHound installs the integrations (using Java's
ServiceLoader
), hence there should be no problem with RxJava3's baseline (which is Java 6 at the moment). There are no Java 8 bytecodes in that class too, only JDK 8 class references. Netty is Java 6 too and it was fine for them.A separate test source is used because BlockHound is global (since it is implemented as a Java agent) and cannot be disabled after the installation.